package cn.fl.risk.service.impl;

import java.util.*;

import cn.cmm.base.framework.utils.BaseLogUtils;
import cn.fl.project.service.IPrjLnkCompService;
import com.alibaba.fastjson.JSONObject;
import fl.spl.facade.lnkcomp.condition.PrjLnkCompQueryCondition;
import fl.spl.facade.lnkcomp.dto.PrjLnkCompDTO;
import cn.cmm.base.framework.logger.eum.LogExceptionEnum;
import cn.cmm.base.framework.utils.BaseLogUtils;
import cn.fl.commons.result.ResponseData;
import cn.fl.risk.vo.CapCstPayListVO;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.shiqiao.fl.repay.bill.dto.BillOverviewDTO;
import com.shiqiao.fl.repay.bill.facade.IRepayBillApiService;
import com.shiqiao.fl.repay.bill.request.QueryBillParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cmm.comm.facade.framework.api.ISysCtrlCfgApiService;
import cmm.comm.facade.framework.api.ISysDictionaryApiService;
import cmm.comm.facade.framework.condition.SysCtrlCfgQueryCondition;
import cmm.comm.facade.framework.dto.SysDictionaryDTO;
import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.page.DataResultVO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.Pager;
import cmm.user.facade.system.dto.SysOrgDTO;
import cn.cmm.base.framework.constant.BaseConstant;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.utils.CollectionUtils;
import cn.cmm.base.framework.utils.DateUtils;
import cn.cmm.base.framework.utils.StringUtils;
import cn.fl.capital.condition.CapCstPayListQueryCondition;
import cn.fl.capital.constant.CapitalConstant;
import cn.fl.capital.dto.CapCstPayListDTO;
import cn.fl.capital.service.ICapCstPayListApiService;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.fl.project.condition.PrjPrdPaySchDQueryCondition;
import cn.fl.project.condition.PrjPrdPaySchMQueryCondition;
import cn.fl.project.service.IPrjPrdPaySchDService;
import cn.fl.project.service.IPrjPrdPaySchMService;
import cn.fl.project.vo.PrjPrdPaySchDVO;
import cn.fl.project.vo.PrjPrdPaySchMVO;
import cn.fl.risk.condition.RskCommRecQueryCondition;
import cn.fl.risk.condition.RskRentRemindQueryCondition;
import cn.fl.risk.constant.RiskConstant;
import cn.fl.risk.dto.RskPayPrdTypRDTO;
import cn.fl.risk.dto.RskRentRemindDTO;
import cn.fl.risk.service.IRskPayPrdTypRApiService;
import cn.fl.risk.service.IRskRentRemindApiService;
import cn.fl.risk.service.IRskRentRemindService;
import cn.fl.risk.transform.RskPayPrdTypRVOTransform;
import cn.fl.risk.transform.RskRemindPayDtlVOTransform;
import cn.fl.risk.transform.RskRentRemindVOTransform;
import cn.fl.risk.vo.RskPayPrdTypRVO;
import cn.fl.risk.vo.RskRemindPayDtlVO;
import cn.fl.risk.vo.RskRentRemindVO;
import fl.customer.facade.customer.api.ICustomerQueryApiService;
import fl.customer.facade.customer.condition.CstBscInfoQueryCondition;
import fl.customer.facade.customer.dto.CstBscInfoDTO;
import fl.customer.facade.customer.dto.CstContactInfoDTO;

/**
 * @Description: 租金提醒 客户端服务层接口实现
 * 业务层方法名称前缀：
 * 新增：add*
 * 删除：remove*
 * 修改：modify*
 * 批量：batch*
 * 查询对象：select* get*
 * 查询集合：search*
 */
@Service
public class RskRentRemindServiceImpl implements IRskRentRemindService {

	/**
     * 日志
     */
    @SuppressWarnings("unused")
    private static final Logger logger = LoggerFactory.getLogger(RskRentRemindServiceImpl.class);

	/**
	 * 租金提醒 暴露服务
	 */
	@Autowired
	private IRskRentRemindApiService rskRentRemindApiService;
	/**
     * 数据字典服务
     */
    @Autowired
    private ISysDictionaryApiService sysDictionaryApiService;
    @Autowired
    private ISysCtrlCfgApiService sysCtrlCfgApiService;
	@Autowired
	private ICustomerQueryApiService customerQueryApiService;
	@Autowired
	private ICapCstPayListApiService capCstPayListApiService;
	@Autowired
	private IPrjPrdPaySchMService prjPrdPaySchMService;
    @Autowired
    private IPrjPrdPaySchDService prjPrdPaySchDService;
    
    @Autowired
    private IRskPayPrdTypRApiService rskPayPrdTypRApiService;
    @Autowired
	private IPrjLnkCompService prjLnkCompService;

	@Autowired
	private IRepayBillApiService repayBillApiService;

	@Override
	public RskRentRemindVO selectById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)) return null;
		RskRentRemindDTO dto = this.rskRentRemindApiService.selectRskRentRemindById(id);
		return RskRentRemindVOTransform.toVO(dto);
	}

	@Override
	public Pager searchListPage(Pager page) throws BaseException{
        RskRentRemindQueryCondition condition=null;
        if(null == page) {
            page = new Pager();
            page.setCondition(new RskRentRemindQueryCondition());
        }
		condition=(RskRentRemindQueryCondition)page.getCondition();
        condition.setSysCd(CurrentThreadContext.getCurrentSysCd());//当前系统代码
        condition.setOrgCd(CurrentThreadContext.getCurrentOrgCd());//当前机构代码
        condition.setUsrId(CurrentThreadContext.getCurrentUserId());//当前用户ID

        this.setRemindRange(condition);
		page=this.rskRentRemindApiService.searchRskRentRemindListPage(page);
		if(CollectionUtils.isNotEmpty(page.getResultList())){
            List<RskRentRemindVO> voList=RskRentRemindVOTransform.toVOList((List<RskRentRemindDTO>)page.getResultList());
            //this.setDictData(voList);
            page.setResultList(voList);
        }
        return page;
	}

	@Override
	public List<RskRemindPayDtlVO> searchList(RskRentRemindQueryCondition condition) throws BaseException{
		if(null == condition) condition=new RskRentRemindQueryCondition();
		condition.setSysCd(CurrentThreadContext.getCurrentSysCd());//当前系统代码
		condition.setOrgCd(CurrentThreadContext.getCurrentOrgCd());//当前机构代码
		condition.setUsrId(CurrentThreadContext.getCurrentUserId());//当前用户ID
        this.setRemindRange(condition);
		List<RskRemindPayDtlVO> voList= RskRemindPayDtlVOTransform.toVOList(this.rskRentRemindApiService.searchRskRentRemindList(condition));
	
		if(CollectionUtils.isNotEmpty(voList)){
			List<Long> idList=new ArrayList<>(voList.size());
			for(RskRemindPayDtlVO vo:voList){
				idList.add(vo.getCstId());
			}
			//查询客户紧急联系人信息
			List<CstContactInfoDTO> cstContactInfoDTOList=this.customerQueryApiService.searchCstContactInfo(idList);
			Map<Long,CstContactInfoDTO> cstMap=null;
			if(CollectionUtils.isNotEmpty(cstContactInfoDTOList)){
				cstMap=new HashMap<>(cstContactInfoDTOList.size());
				for(CstContactInfoDTO dto:cstContactInfoDTOList){
					cstMap.put(dto.getId(),dto);
				}
			}
			for(RskRemindPayDtlVO vo:voList){
				if(cstMap!=null&&cstMap.containsKey(vo.getCstId())){
					CstContactInfoDTO contactInfoDTO=cstMap.get(vo.getCstId());
					vo.setLkMan(contactInfoDTO.getCstNm());
					vo.setLkTel(contactInfoDTO.getMp1());
				}
			}
			//TODO  2017-12-12  15:59:13 ZT查询 支付表与货物种类关联表
			List<Long> paySchIdList=new ArrayList<>(voList.size());
			for(RskRemindPayDtlVO vo:voList){
				paySchIdList.add(vo.getPaySchId());
			}
			List<RskPayPrdTypRDTO> searchTypeVfLogRList =null;
			if(CollectionUtils.isNotEmpty(paySchIdList)){
			 searchTypeVfLogRList = this.rskPayPrdTypRApiService.searchTypeList(paySchIdList);
			}
			if(CollectionUtils.isNotEmpty(searchTypeVfLogRList)){
				for (int i = 0; i < voList.size(); i++) {
					for (int j = 0; j < searchTypeVfLogRList.size(); j++) {
						if(voList.get(i).getPaySchId().equals(searchTypeVfLogRList.get(j).getPaySchId())){
							voList.get(i).setPrdTypCd(searchTypeVfLogRList.get(j).getPrdTypCd());
						}
					}
				}
			}
			
			
		}
		//TODO  2017-12-12  15:59:13 ZT 设置数据字典
		this.setDictData(voList);

		return voList;
	}

	/**
	 * 查询客户账单列表
	 *
	 * @param condition
	 * @return
	 * @throws BaseException
	 */
	@Override
	public List<CapCstPayListVO> searchCstBillList(RskRentRemindQueryCondition condition) throws BaseException {
        CapCstPayListQueryCondition payListQueryCondition=new CapCstPayListQueryCondition();
		Map<Long, String> cstMap = null;
		List<CapCstPayListVO> result = new ArrayList<>();
        if(condition!=null&&StringUtils.isNotEmpty(condition.getCstId())){
            payListQueryCondition.setCstId(condition.getCstId());
            cstMap=new HashMap<>(1);
            CstBscInfoDTO cstBscInfoDTO=this.customerQueryApiService.getCstBscInfoById(condition.getCstId());
            if(null != cstBscInfoDTO){
                cstMap.put(cstBscInfoDTO.getId(),cstBscInfoDTO.getCstNm());
            }
        }else{
            CstBscInfoQueryCondition cstBscInfoQueryCondition=new CstBscInfoQueryCondition();
            cstBscInfoQueryCondition.setCstNm(condition.getCstNm());
            List<CstBscInfoDTO> cstList = this.customerQueryApiService.searchCstBscInfoList(cstBscInfoQueryCondition);
            if(CollectionUtils.isEmpty(cstList)){
                return result;
            }
            List<Long> cstIdList=new ArrayList<>(cstList.size());
            cstMap=new HashMap<>(cstList.size());
            for(CstBscInfoDTO cstBscInfoDTO:cstList){
                cstIdList.add(cstBscInfoDTO.getId());
                cstMap.put(cstBscInfoDTO.getId(),cstBscInfoDTO.getCstNm());
            }
            payListQueryCondition.setCstIdList(cstIdList);
        }
		List<CapCstPayListDTO> list = this.capCstPayListApiService.searchCapCstPayListList(payListQueryCondition);
		if(CollectionUtils.isNotEmpty(list)){
			for (CapCstPayListDTO capCstPayListDTO : list) {
				CapCstPayListVO capCstPayListVO = new CapCstPayListVO();
				BeanUtils.copyProperties(capCstPayListDTO, capCstPayListVO);
				if (cstMap != null && cstMap.containsKey(capCstPayListDTO.getCstId())) {
					capCstPayListVO.setCstNm(cstMap.get(capCstPayListDTO.getCstId()));
				}
				if ("mcr".equals(capCstPayListDTO.getBizTypCd())) {
					Long billId = capCstPayListDTO.getPaySchId();
					if (null == billId) {
						BaseLogUtils.newLogger("小贷账单信息错误, CapCstPayListDTO: {}"
								, JSON.toJSONString(capCstPayListDTO)).error(LogExceptionEnum.API_CODE_0102);
					}else {
						capCstPayListVO.setSettleAmt(calMcrSettleAmt(billId));
					}
				}
				result.add(capCstPayListVO);
			}
        }
		return result;
	}

	private Long calMcrSettleAmt(Long mcrBillId) {
		QueryBillParam queryBillParam = new QueryBillParam();
		queryBillParam.setBusinessCd("2");
		queryBillParam.setPaySchId(mcrBillId);
		ResponseData<BillOverviewDTO> billResponseData = repayBillApiService.calRepayAmt(queryBillParam);

		if (!billResponseData.isSuccess()) {
			BaseLogUtils.newLogger("请求服务出现异常, Request: {}, Response: {}"
					, JSON.toJSONString(queryBillParam), JSON.toJSONString(billResponseData))
					.error(LogExceptionEnum.API_CODE_0102);
			return null;
		}
		if(null == billResponseData.getData()){
			BaseLogUtils.newLogger("请求服务出现异常, 计算账单应还金额出错, Request: {}, Response: {}"
					, JSON.toJSONString(queryBillParam), JSON.toJSONString(billResponseData))
					.error(LogExceptionEnum.API_CODE_0102);
			return null;
		}
		BaseLogUtils.newLogger("请求结算小贷结清金额, Request: {}, Response: {}"
				, JSON.toJSONString(queryBillParam), JSON.toJSONString(billResponseData)).info();
		return billResponseData.getData().getSettleAmt();
	}

	@Override
	public List<CapCstPayListDTO> searchLnkCompCstBillList(RskRentRemindQueryCondition condition) throws BaseException {

		if (StringUtils.isEmpty(condition.getLnkCompNm()))
			return null;
		List<Long> compIdList=new ArrayList<>();
		if (StringUtils.isNotEmpty(condition.getLnkCompNm())){
			compIdList=new ArrayList<>();
			PrjLnkCompQueryCondition prjLnkCompQueryCondition = new PrjLnkCompQueryCondition();
			prjLnkCompQueryCondition.setLnkCompNm(condition.getLnkCompNm());
			List<PrjLnkCompDTO> list = this.prjLnkCompService.selectListByNm(prjLnkCompQueryCondition);
			BaseLogUtils.info(logger, "searchLnkCompCstBillList", "根据挂靠公司名称查询客户基础信息" + JSONObject.toJSONString(condition) + "  查询结果：  " + JSONObject.toJSONString(list));
			if(CollectionUtils.isEmpty(list)){
				return new ArrayList<CapCstPayListDTO>();
			}
			for(PrjLnkCompDTO prjLnkCompDTO:list){
				compIdList.add(prjLnkCompDTO.getId());
			}
		}
		if(StringUtils.isNotEmpty(condition.getLnkCompId())){
			if (compIdList.size() > 1 && compIdList.contains(condition.getLnkCompId())){
				compIdList=new ArrayList<>();
				compIdList.add(condition.getLnkCompId());
			}

		}
		CapCstPayListQueryCondition payListQueryCondition=new CapCstPayListQueryCondition();
		payListQueryCondition.setLnkCompIds(compIdList);
        payListQueryCondition.setInsCode("1");
		List<CapCstPayListDTO> res = new ArrayList<>();

		Pager lnkCompPage = new Pager();

		lnkCompPage.setCondition(payListQueryCondition);
		lnkCompPage.setCurrentPage(1);
		lnkCompPage.setEveryPage(1000);
		// 查询资方挂靠公司账单
		Pager lnkCompRes = this.capCstPayListApiService.searchListPageByLnkCompId(lnkCompPage);

		if (lnkCompRes != null && CollectionUtils.isNotEmpty(lnkCompRes.getResultList()))
			res.addAll((List<CapCstPayListDTO>) lnkCompRes.getResultList());
		BaseLogUtils.info(logger, "searchLnkCompCstBillList", "根据挂靠公司名称查询我司账单: 入参" + JSONObject.toJSONString(lnkCompPage) + "  查询结果：  " + JSONObject.toJSONString(lnkCompRes));


		// 查询资方挂靠公司账单
        CapCstPayListQueryCondition capitalCondition=new CapCstPayListQueryCondition();
        capitalCondition.setLnkCompIds(compIdList);
        lnkCompPage.setCondition(capitalCondition);
        Pager capitalCompRes = this.capCstPayListApiService.searchListPageByLnkCompId(lnkCompPage);
        if (capitalCompRes != null && CollectionUtils.isNotEmpty(capitalCompRes.getResultList()))
            res.addAll((List<CapCstPayListDTO>) capitalCompRes.getResultList());
        BaseLogUtils.info(logger, "searchLnkCompCstBillList", "根据挂靠公司名称查询资方账单: 入参" + JSONObject.toJSONString(lnkCompPage) + "  查询结果：  " + JSONObject.toJSONString(capitalCompRes));

		return (res);
	}

	private void setRemindRange(RskRentRemindQueryCondition condition){
        //设置提醒范围
        SysCtrlCfgQueryCondition sysCtrlCfgQueryCondition=new SysCtrlCfgQueryCondition();
        sysCtrlCfgQueryCondition.setOrgCd(RiskConstant.CODE_RSK_ORG_CD);
        sysCtrlCfgQueryCondition.setSysCd(RiskConstant.CODE_RSK_SYS_CD);
        sysCtrlCfgQueryCondition.setCtrlCode(RiskConstant.CODE_RSK_CTRL_CD_1);
        String last=sysCtrlCfgApiService.searchSysCtrlCfgByCtrlCode(sysCtrlCfgQueryCondition);
        sysCtrlCfgQueryCondition.setCtrlCode(RiskConstant.CODE_RSK_CTRL_CD_2);
        String begin=sysCtrlCfgApiService.searchSysCtrlCfgByCtrlCode(sysCtrlCfgQueryCondition);
        Date now =new Date();
        int days=0;
        if(StringUtils.isNotEmpty(last)){
            days=Integer.valueOf(last);
            condition.setEndPayDt(DateUtils.formatDateToString(DateUtils.getDateAddDate(now,5,days),DateUtils.YYYY_MM_DD));
        }
        if(StringUtils.isNotEmpty(begin)){
            days=Integer.valueOf(begin);
            condition.setStartPayDt(DateUtils.formatDateToString(DateUtils.getDateAddDate(now,5,-days),DateUtils.YYYY_MM_DD));
        }
    }

    /**
     * 查询客户支付表列表
     *
     * @param condition
     * @return
     * @throws BaseException
     */
    @Override
    public List<PrjPrdPaySchMVO> searchPaySchList(PrjPrdPaySchMQueryCondition condition) throws BaseException {
        List<PrjPrdPaySchMVO> voList = this.prjPrdPaySchMService.searchList(condition);
        if(CollectionUtils.isNotEmpty(voList)){
            List<Long> cstIdList=new ArrayList<>(voList.size());
            for(PrjPrdPaySchMVO vo : voList){
                if(!cstIdList.contains(vo.getCstId())){
                    cstIdList.add(vo.getCstId());
                }
            }
            CstBscInfoQueryCondition cstBscInfoQueryCondition=new CstBscInfoQueryCondition();
            cstBscInfoQueryCondition.setIds(cstIdList);
            List<CstBscInfoDTO> cstList = this.customerQueryApiService.searchCstBscInfoList(cstBscInfoQueryCondition);
            if(CollectionUtils.isNotEmpty(cstIdList)){
                Map<Long,String> cstMap=new HashMap<>(cstList.size());
                for(CstBscInfoDTO cst:cstList){
                    if(!cstMap.containsKey(cst.getId())){
                        cstMap.put(cst.getId(),cst.getCstNm());
                    }
                }

                for(PrjPrdPaySchMVO vo : voList){
                    if(cstMap.containsKey(vo.getCstId())){
                        vo.setCstNm(cstMap.get(vo.getCstId()));
                    }
                }
            }
        }
        return voList;
    }


	/**
     * 添加数据字典名称 (提醒支付表明细)
     * @param voList
     */
	public void setDictData(List<RskRemindPayDtlVO> voList){
	if(CollectionUtils.isEmpty(voList)) return;
	//TODO  2017 -12-12 16:18:23  ZT  
	Map<String, String> _CdMap = this.sysDictionaryApiService.searchGroupToMap(
	CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(), RiskConstant.CODE_RSK_PAY_PRD_TYP_R_CD);
		/*  过滤后的字典表数据
		 * List<SysDictionaryDTO> searchGroupWithLevel =  this.sysDictionaryApiService.searchGroupWithLevel(
				CurrentThreadContext.getCurrentSysCd(),CurrentThreadContext.getCurrentOrgCd(),
				RiskConstant.CODE_RSK_PAY_PRD_TYP_R_CD, Integer.parseInt(RiskConstant.CODE_RSK_PAY_PRD_TYP_R_CODE_LVL));*/
		for(RskRemindPayDtlVO vo:voList){
			if (_CdMap != null && _CdMap.containsKey(vo.getPrdTypCd())) {
            	vo.setPrdTypCdNm(_CdMap.get(vo.getPrdTypCd()));
        	}	
		}
	}


    /**
     * 查询客户支付表列表
     *
     * @param condition
     * @return
     * @throws BaseException
     */
    @Override
    public List<PrjPrdPaySchDVO> searchPaySchDList(PrjPrdPaySchDQueryCondition condition) throws BaseException {
        List<String> feeTypCdList=new ArrayList<>(3);
        feeTypCdList.add("S02");
        feeTypCdList.add("S03");
        feeTypCdList.add("S04");
        condition.setExcludedFeeTypCdList(feeTypCdList);
        condition.setSortName("PAY_PD");
        List<PrjPrdPaySchDVO> voList = this.prjPrdPaySchDService.searchList(condition);
        if (CollectionUtils.isNotEmpty(voList)) {
            Map<String, String> feeTypCdMap = this.sysDictionaryApiService.searchGroupToMap(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(), CapitalConstant.CODE_VF_FEE_TYP_CD);
            for (PrjPrdPaySchDVO vo : voList) {
                if (feeTypCdMap != null && feeTypCdMap.containsKey(vo.getFeeTypCd())) {
                    vo.setFeeTypCdNm(feeTypCdMap.get(vo.getFeeTypCd()));
                }
            }
        }
        return voList;
    }

	@Override
	public List<KeyValueVO> searchPrdTypCdList() throws BaseException {
	List<SysDictionaryDTO> searchGroupWithLevel =  this.sysDictionaryApiService.searchGroupWithLevel(
	CurrentThreadContext.getCurrentSysCd(),CurrentThreadContext.getCurrentOrgCd(),
	RiskConstant.CODE_RSK_PAY_PRD_TYP_R_CD, Integer.parseInt(RiskConstant.CODE_RSK_PAY_PRD_TYP_R_CODE_LVL));
		List<KeyValueVO> kvList = new ArrayList<KeyValueVO>();
		if(CollectionUtils.isEmpty(searchGroupWithLevel)){
			return kvList;
		}
		for (SysDictionaryDTO sysDictionaryDTO : searchGroupWithLevel) {
			KeyValueVO kv = new KeyValueVO();
			kv.setKey(sysDictionaryDTO.getCode());
			kv.setValue(sysDictionaryDTO.getCodeNm());
			kvList.add(kv);
		}
		return kvList;
	}

	@Override
	public boolean modify(RskPayPrdTypRVO entity) throws BaseException {
		return this.rskPayPrdTypRApiService.modify(RskPayPrdTypRVOTransform.toDTO(entity));
	}

	@Override
	public RskPayPrdTypRVO selectRskPayPrdTypRById(Long id) throws BaseException {
		if(StringUtils.isEmpty(id)) return null;
		return RskPayPrdTypRVOTransform.toVO(this.rskPayPrdTypRApiService.selectRskPayPrdTypRById(id));
	}

	@Override
	public Long add(RskPayPrdTypRVO entity) throws BaseException {
		if(entity==null) return null;
		return this.rskPayPrdTypRApiService.add(RskPayPrdTypRVOTransform.toDTO(entity));
	}

	@Override
	public List<RskPayPrdTypRVO> searchTypeList(List<Long> idsList) throws BaseException {
		if(CollectionUtils.isEmpty(idsList)) return new ArrayList<RskPayPrdTypRVO>();
		return RskPayPrdTypRVOTransform.toVOList(this.rskPayPrdTypRApiService.searchTypeList(idsList));
	}
	/**
     * 租金提醒批量外呼
     * @param
     * @return
     */
    @Override
    public DataResultVO rentRemindOutboundList(RskCommRecQueryCondition condition)throws BaseException{
    	if(condition == null || CollectionUtils.isEmpty(condition.getCstIds())){
    		return new DataResultVO(BaseConstant.IS_YESNO_NO,"查询参数异常");
    	}
    	DataResultDTO resultDTO = rskRentRemindApiService.rentRemindOutbroundList(condition);
        if(null!=resultDTO){
            return new DataResultVO(Integer.parseInt(resultDTO.getCode()),resultDTO.getInfo(),resultDTO.getData());
        }else{
            return new DataResultVO(BaseConstant.IS_YESNO_NO,"租金提醒批量外呼");
        }
    }
}
